package com.kuangstudy.result;

/**
 * @description: 统一返回的常量类
 * 对内修改开放，对外修改关闭---枚举
 * @author: xuke
 * @time: 2021/6/23 22:12
 */
public enum ResultEnum {

    SUCCESS(200, "成功!"),
    UNKNOWN_REASON(501, "未知错误"),
    SERVER_ERROR(500, "服务器忙，请稍后在试"),
    EMPTY_ERROR(503, "参数不允许为空");


    private Integer code;
    private String message;

    ResultEnum(Integer code, String mesage) {
        this.code = code;
        this.message = mesage;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
